package com.ruoyi.knowledge.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 知识库文件对象 knowledge_file
 * 
 * @author ruoyi
 */
public class KnowledgeFile extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 知识库ID */
    @Excel(name = "知识库ID")
    private Long knowledgeId;

    /** 文件名 */
    @Excel(name = "文件名")
    private String filename;

    /** 文件类型 */
    @Excel(name = "文件类型")
    private String fileType;

    /** 文件大小 */
    @Excel(name = "文件大小")
    private Long fileSize;

    /** 文件路径 */
    private String fileUrl;

    /** 上传人 */
    @Excel(name = "上传人")
    private String uploader;

    /** 向量化状态（0未处理 1处理中 2已完成 3失败） */
    @Excel(name = "向量化状态", readConverterExp = "0=未处理,1=处理中,2=已完成,3=失败")
    private String fileStatus;

    /** 向量数量 */
    @Excel(name = "向量数量")
    private Integer vectorCount;

    /** 处理失败原因 */
    private String failReason;

    /** 上传时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date uploadTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    
    public void setKnowledgeId(Long knowledgeId) 
    {
        this.knowledgeId = knowledgeId;
    }

    public Long getKnowledgeId() 
    {
        return knowledgeId;
    }
    
    public void setFilename(String filename) 
    {
        this.filename = filename;
    }

    public String getFilename() 
    {
        return filename;
    }
    
    public void setFileType(String fileType) 
    {
        this.fileType = fileType;
    }

    public String getFileType() 
    {
        return fileType;
    }
    
    public void setFileSize(Long fileSize) 
    {
        this.fileSize = fileSize;
    }

    public Long getFileSize() 
    {
        return fileSize;
    }
    
    public void setFileUrl(String fileUrl) 
    {
        this.fileUrl = fileUrl;
    }

    public String getFileUrl() 
    {
        return fileUrl;
    }
    
    public void setUploader(String uploader) 
    {
        this.uploader = uploader;
    }

    public String getUploader() 
    {
        return uploader;
    }
    
    public void setFileStatus(String fileStatus) 
    {
        this.fileStatus = fileStatus;
    }

    public String getFileStatus() 
    {
        return fileStatus;
    }
    
    public void setVectorCount(Integer vectorCount) 
    {
        this.vectorCount = vectorCount;
    }

    public Integer getVectorCount() 
    {
        return vectorCount;
    }
    
    public void setFailReason(String failReason) 
    {
        this.failReason = failReason;
    }

    public String getFailReason() 
    {
        return failReason;
    }
    
    public void setUploadTime(Date uploadTime) 
    {
        this.uploadTime = uploadTime;
    }

    public Date getUploadTime() 
    {
        return uploadTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("knowledgeId", getKnowledgeId())
            .append("filename", getFilename())
            .append("fileType", getFileType())
            .append("fileSize", getFileSize())
            .append("fileUrl", getFileUrl())
            .append("uploader", getUploader())
            .append("fileStatus", getFileStatus())
            .append("vectorCount", getVectorCount())
            .append("failReason", getFailReason())
            .append("uploadTime", getUploadTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
} 